<?php

function jquery_menu_js(){
echo '<link href="'.osc_base_url().'oc-content/plugins/jquery_menu/jquery_menu.css" rel="stylesheet" type="text/css" />';
echo '<script type="text/javascript" src="'.osc_base_url().'oc-content/plugins/jquery_menu/jquery_menu.js"></script>';
}
function jquery_menu(){
echo '<ul class="topnav"><li><a href="'.osc_base_url().'">Home</a></li>';
while ( osc_has_categories() ){
echo '<li><a href="'.osc_search_category_url().'">'.osc_category_name().'</a><ul class="subnav">';
while ( osc_has_subcategories() ) { echo '<li><a href="'.osc_search_category_url().'">'.osc_category_name().'</a></li>';
}
echo '</ul></li>';
}
echo '</ul>';
}
function jquery_admin_menu() {
    echo '<h3><a href="#">JQuery Menu</a></h3>
    <ul>
        <li><a href="'.osc_admin_render_plugin_url("jquery_menu/help.php").'?section=types">&raquo; ' . __('F.A.Q. / Help', 'OC Slider') . '</a></li>
    </ul>';
}
 function jquery_menu_help() {
        osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/help.php') ;
    }
// This is needed in order to be able to activate the plugin
osc_register_plugin(osc_plugin_path(__FILE__), '');
// This is a hack to show a Uninstall link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_uninstall', '');
//Header
osc_add_hook('header', 'jquery_menu_js');
// Admin menu
osc_add_hook('admin_menu', 'jquery_admin_menu');
// This is a hack to show a Configure link at plugins table (you could also use some other hook to show a custom option panel)
osc_add_hook(osc_plugin_path(__FILE__) . '_configure', 'jquery_menu_help');
?>